
	 //律师业绩图形化报表种类
   	 var lawyerChartCatalog=[{catalogId:1,catalogName:'合同金额报表'},{catalogId:2,catalogName:'付款金额报表'},{catalogId:3,catalogName:'提成金额报表'}];
   	 //律师业绩图形化报表存储器
   	 var lawyerChartCatalogStore=new Ext.data.JsonStore({
				data:lawyerChartCatalog,
				fields:["catalogId","catalogName"]
		  	});

   	 //查看律师业绩图形报表面板
     var lawyerChartPanel;
     //查看律师业绩图形报表窗口
     var lawyerChartWin;

     //存储器
	 var lawyerChartStore = new Ext.data.ArrayStore({
				url:"LawyerChartRequest.jsj?lawyerChartCatalog=1&startTime=0&endTime=0",
				fields:["name","money"]
			});

      //查看律师业绩图形报表函数
      function lawyerChartFun(){
      			//查看律师业绩图形报表窗口
       			lawyerChartWin=new Ext.Window({
       					layout:'fit',
       					width:850,
       					height:550,
       					closeAction:'hide',
						plain:true,
						title:'律师业绩图形化报表窗口',
						items:lawyerChartPanel
       				});
				//加载数据
       			lawyerChartStore.load();
       			//显示窗口
       			lawyerChartWin.show();
       		}

       		//律师业绩行报表
       		var lawyerLineCharts=new Ext.chart.LineChart({
       							 store: lawyerChartStore,
						         yField: 'money',
						         xField: 'name',
						         xAxis: new Ext.chart.CategoryAxis({
						         				title: '律师'
				            			}),
           						 yAxis: new Ext.chart.NumericAxis({
               									 title: '金额'
         							    }),
         					     extraStyle: {
              								 xAxis: {
                    								labelRotation: 0
               									 }
            							 }
       						})

       //查看图形报表面板
       lawyerChartPanel=new Ext.form.FormPanel({
       			labelAlign:'right',
       			collapsible:true,
       			labelwidth:60,
       			frame:true,
       			bodyStyle : 'padding:5px 5px 0',
       			waitMsgTarget : true,

        		items : [

						        {
						        	xtype:'datefield',
						        	format:'Y-m-d',
						        	itemCls:'float-left',//向左浮动
									clearCls:'allow-float',//允许浮动
						            fieldLabel :'开始时间',
									id :'chartstartTime',
									name :'chartstartTime',
									allowBlank :true
						        },
						        {
						        	xtype:'datefield',
						        	format:'Y-m-d',
						        	itemCls:'float-left',//向左浮动
									clearCls:'allow-float',//允许浮动
						            fieldLabel :'结束时间',
									id :'chartendTime',
									name :'chartendTime',
									allowBlank :true
						        },
        				new Ext.form.ComboBox({
								fieldLabel:'请选择报表种类',
								itemCls:'float-left',//向左浮动
								clearCls:'allow-float',//允许浮动
								store:lawyerChartCatalogStore,
								valueField:'catalogId',
								displayField:'catalogName',
								mode:'local',
								forceSelection:true,
								emptyText:'请选择报表种类',
								hiddenName:'lawyerChart',
								editable:false,
								triggerAction:'all',
								id:'lawyerChartCata',
								name:'lawyerChartCata',
								value:'合同金额报表',
								listeners:{
										change: function(field,newValue,oldValue){
											//获得时间段
											var startTime=Ext.getCmp("chartstartTime").value;
											var endTime=Ext.getCmp("chartendTime").value;
											lawyerChartStore = new Ext.data.ArrayStore({
													url:"LawyerChartRequest.jsj?lawyerChartCatalog="+newValue+"&startTime="+startTime+"&endTime="+endTime,
													fields:["name","money"]
												});
												//重新加载数据
       											lawyerChartStore.reload();
												//重新绑定数据
												lawyerLineCharts.bindStore(lawyerChartStore);
										}
								}
							}),
							lawyerLineCharts
      					  ]
       			})
